﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using BLL.ManageDBLNo;
using System.Data;
namespace BLL
{
    public class ManageDBLNoBLL
    {
        //last3code
        #region
        public static List<string> GenerateRepeatCode(int length)
        {
            return GenerateCode.GenerateRepeatCode(length);
        }

        public static List<string> GenerateSequenceCode(int length,bool isBoth)
        {
            return GenerateCode.GenerateSequenceCode(length,isBoth);
        }

        public static int UpdateLast3Code(List<string> list,bool isAvailable)
        {
            return ManageLast3Code.UpdateLast3Code(list, isAvailable);
        }

        public static int SetOrganizationLast3CodeSequenceAvailable()
        {
            return ManageLast3Code.SetLast3CodeSequenceAvailableOrNot(3, true);
        }

        public static int SetOrganizationLast3CodeSequenceReserve()
        {
            return ManageLast3Code.SetLast3CodeSequenceAvailableOrNot(3, false);
        }

        public static int SetOrganizationLast3CodeRepeatAvailable()
        {
            return ManageLast3Code.SetLast3CodRepeateAvailableOrNot(3, true);
        }

        public static int SetOrganizationLast3CodeRepeatReserve()
        {
            return ManageLast3Code.SetLast3CodRepeateAvailableOrNot(3, true);
        }

        public static DataSet GetAllLast3Code()
        {
            return ManageLast3Code.GetAllLast3Code();
        }

        public static DataSet GetAllLast3CodeReserve()
        {
            return ManageLast3Code.GetAllLast3CodeReserve();
        }

        public static DataSet GetLast3Code(string strLike)
        {
            return ManageLast3Code.GetLast3Code(strLike);
        }

        #endregion

        public static int UpdateLast4Code(List<string> list, bool isAvailable)
        {
            return ManageLast4Code.UpdateLast4Code(list, isAvailable);
        }

        public static DataSet GetAllLast4Code()
        {
            return ManageLast4Code.GetAllLast4Code();
        }

        public static DataSet GetAllLast4CodeReserve()
        {
            return ManageLast4Code.GetAllLast4CodeReserve();
        }

        public static DataSet GetLast4Code(string strLike)
        {
            return ManageLast4Code.GetLast4Code(strLike);
        }

        public static int UpdateLast6Code(List <string> list,bool isAvailable)
        {
            return ManageLast6Code.UpdateLast6Code(list,isAvailable);
        }

        public static DataSet GetAllLast6Code()
        {
            return ManageLast6Code.GetAllLast6Code();
        }

        public static DataSet GetAllLast6CodeReserve()
        {
            return ManageLast6Code.GetAllLast6CodeReserve();
        }

        public static DataSet GetLast6Code(string strLike)
        {
            return ManageLast6Code.GetLast6Code(strLike);
        }
    }
}
